<template>
	<div class="wrapper">
		<head-page
			:title="info.secretaryTitle"
			style="border-bottom: 2px solid #dad9df"
			id="backstyle"
		></head-page>
		<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
			<van-swipe-item
				v-for="(item, index) in info.secretaryImage"
				:key="index"
			>
				<img :src="getImgUrl(item)" alt="" />
			</van-swipe-item>
		</van-swipe>
		<div class="war">
			<div class="area-center">
				<div class="content richText bold-size" v-html="info.secretaryText"></div>
			</div>
		</div>
	</div>
</template>
<script>
import { secretaryDetail } from "@/api/index"
export default {
	data() {
		return {
			info: {}
		}
	},
	mounted() {
		secretaryDetail({
			secretaryId: this.$route.query.id
		}).then(res => {
			if (res.data.code == 200) {
				this.info = res.data.data
				this.info.secretaryImage = this.info.secretaryImage ? this.info.secretaryImage.split(',') : []
				this.info.secretaryText = this.dataHTML(res.data.data.secretaryText)
			}
		})
	},
	methods: {
		getImgUrl(img) {
			return this.montageImgUrl(img)
		},
	},
}
</script>
<style scoped>
.wrapper {
}
.my-swipe img {
	width: 100%;
	height: 2rem;
}
.content{
	word-wrap:break-word;
}
</style>